// JavaScript Document
(function(a) {
    Globe_UserInfo_Tip_Init = function() {
        var g = null,
        o = null,
        j = a(".icard");
        j.live("mouseenter",
        function() {
			//层隐藏
            a("#u_info_tip").hide();
            var c = "";  
			var q = a(this).offset(),
			m = q.left,
			d = a(this).width(),
			r = d / 2 - 8,
			t = a(window).width();
			m + 300 > t && (m = m - 300 + d, r = 300 - d / 2 - 8);
			a("#u_info_tip")[0] ? a("#u_info_tip").html('<div class="tip_info"><img class="avatar r3" src="/Public/Images/loading.gif" alt=""><div><p><a href="#">&nbsp;</a></p><p>\u83b7\u53d6\u7528\u6237\u4fe1\u606f...</p><p>&nbsp;</p></div></div><div class="tip_toolbar">&nbsp;</div><div class="tip_arrow"></div>') : a("body").append('<div id="u_info_tip"><div class="tip_info"><img class="avatar r3" src="/Public/Images/loading.gif" alt=""><div><p><a href="#">&nbsp;</a></p><p>\u83b7\u53d6\u7528\u6237\u4fe1\u606f...</p><p>&nbsp;</p></div></div><div class="tip_toolbar">&nbsp;</div><div class="tip_arrow"></div></div>');
			a("#u_info_tip").css({
				top: q.top - 150 + "px",
				left: m + "px"
			});
			a("#u_info_tip .tip_arrow").css("margin-left", r + "px");
			g = setTimeout(function() {
				a("#u_info_tip").show()
			},200);
			a("#u_info_tip").hover(function() {
				clearTimeout(g);
				a("#u_info_tip").show()
			},
			function() {
				a("#u_info_tip").hide()
			});
			o = setTimeout(function() {
				  a.ajax({
                        url: "index.html",
                        type: "POST",
                        data: {
                            uname: c,
                            groupId: c
                        },
                        dataType: "json",
                        success: function(e) {
                            a("#u_info_tip .tip_info").html(314213);
                        },
                        error: function(c, d) {
                            a("#u_info_tip .tip_info").html('error');
                            //a("#u_info_tip").hide()
                        }
                    });
			},500);
            
        });
        j.live("mouseleave",
        function() {
            g = setTimeout(function() {
                a("#u_info_tip").hide()
            },
            50)
        })
    };
    Globe_UserInfo_Tip_Init()
})(jQuery);